<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.5"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SWM34S_LVGL7.11_SWMUI: C:/Users/DELL/Desktop/Commit/lvgl/SWM34S_LVGL7.11_SWMUI_20230515/APP/BSP/dev_io.h 文件参考</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">SWM34S_LVGL7.11_SWMUI<span id="projectnumber">&#160;V7.9</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_0ca16891106f5a3e9ad635a0d6c5f98f.html">APP</a></li><li class="navelem"><a class="el" href="dir_4ca18d753a70f6eada20fde478bd3fc8.html">BSP</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">宏定义</a>  </div>
  <div class="headertitle"><div class="title">dev_io.h 文件参考</div></div>
</div><!--header-->
<div class="contents">

<p>IO 模拟外设功能底层操作宏, 用于对接[外设驱动层], [用户层]应使用[驱动层]的接口, 不宜直接使用本模块  
<a href="#details">更多...</a></p>
<div class="textblock"><code>#include &quot;SWM341.h&quot;</code><br />
</div><div class="textblock"><div class="dynheader">
dev_io.h 的引用(Include)关系图:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io_8h__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io_8h" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io_8h" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io_8h">
<area shape="rect" title="IO 模拟外设功能底层操作宏, 用于对接[外设驱动层], [用户层]应使用[驱动层]的接口, 不宜直接使用本模块" alt="" coords="5,5,256,60"/>
<area shape="rect" title=" " alt="" coords="87,108,174,133"/>
</map>
</div>
</div><div class="textblock"><div class="dynheader">
此图展示该文件直接或间接的被哪些文件引用了:</div>
<div class="dyncontent">
<div class="center"><img src="dev__io_8h__dep__incl.png" border="0" usemap="#a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io_8hdep" alt=""/></div>
<map name="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io_8hdep" id="a_c_1_2_users_2_d_e_l_l_2_desktop_2_commit_2lvgl_2_s_w_m34_s___l_v_g_l7_811___s_w_m_u_i__20230515_2_a_p_p_2_b_s_p_2dev__io_8hdep">
<area shape="rect" title="IO 模拟外设功能底层操作宏, 用于对接[外设驱动层], [用户层]应使用[驱动层]的接口, 不宜直接使用本模块" alt="" coords="114,5,365,60"/>
<area shape="rect" href="dev__io__i2c_8c.html" title="IO 模拟 IIC 通讯接口" alt="" coords="5,108,228,177"/>
<area shape="rect" href="dev__io__spi_8c.html" title="IO 模拟 SPI 通讯接口" alt="" coords="252,108,475,177"/>
</map>
</div>
</div>
<p><a href="dev__io_8h_source.html">浏览源代码.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="define-members" name="define-members"></a>
宏定义</h2></td></tr>
<tr class="memitem:a171b4c64b86b9c81fdab4fb5c91abda3"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io_8h.html#a171b4c64b86b9c81fdab4fb5c91abda3">IO_DIR_I</a>(GPIOx,  PINx)&#160;&#160;&#160;( ( (GPIOx)-&gt;DIR ) &amp;= ~( 0x01 &lt;&lt; (PINx) ) )</td></tr>
<tr class="memdesc:a171b4c64b86b9c81fdab4fb5c91abda3"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置 IO 口方向 - 输入  <a href="dev__io_8h.html#a171b4c64b86b9c81fdab4fb5c91abda3">更多...</a><br /></td></tr>
<tr class="separator:a171b4c64b86b9c81fdab4fb5c91abda3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0035ca7a6992ee60ccd0bab873012994"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io_8h.html#a0035ca7a6992ee60ccd0bab873012994">IO_DIR_O</a>(GPIOx,  PINx)&#160;&#160;&#160;( ( (GPIOx)-&gt;DIR ) |= ( 0x01 &lt;&lt; (PINx) ) )</td></tr>
<tr class="memdesc:a0035ca7a6992ee60ccd0bab873012994"><td class="mdescLeft">&#160;</td><td class="mdescRight">设置 IO 口方向 - 输出  <a href="dev__io_8h.html#a0035ca7a6992ee60ccd0bab873012994">更多...</a><br /></td></tr>
<tr class="separator:a0035ca7a6992ee60ccd0bab873012994"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab0ead146e3adc7e8710afee28f736c95"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io_8h.html#ab0ead146e3adc7e8710afee28f736c95">IO_GET</a>(GPIOx,  PINx)&#160;&#160;&#160;( ( ( (GPIOx)-&gt;IDR ) &gt;&gt; (PINx) ) &amp; 0x01 )</td></tr>
<tr class="memdesc:ab0ead146e3adc7e8710afee28f736c95"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取 IO 输入(须保证对应 IO 为 GPIO 输入状态, 否则操作无效)  <a href="dev__io_8h.html#ab0ead146e3adc7e8710afee28f736c95">更多...</a><br /></td></tr>
<tr class="separator:ab0ead146e3adc7e8710afee28f736c95"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a96b4afe19e3f086e8b63be4f58797a71"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io_8h.html#a96b4afe19e3f086e8b63be4f58797a71">IO_SET_L</a>(GPIOx,  PINx)&#160;&#160;&#160;( *( ( &amp;( (GPIOx)-&gt;DATAPIN0 ) ) + (PINx) ) = 0 )</td></tr>
<tr class="memdesc:a96b4afe19e3f086e8b63be4f58797a71"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 置低(须保证对应 IO 为 GPIO 输出状态, 否则操作无效)  <a href="dev__io_8h.html#a96b4afe19e3f086e8b63be4f58797a71">更多...</a><br /></td></tr>
<tr class="separator:a96b4afe19e3f086e8b63be4f58797a71"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2b996c7f57f00197b2a21ec4e00265d0"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="dev__io_8h.html#a2b996c7f57f00197b2a21ec4e00265d0">IO_SET_H</a>(GPIOx,  PINx)&#160;&#160;&#160;( *( ( &amp;( (GPIOx)-&gt;DATAPIN0 ) ) + (PINx) ) = 1 )</td></tr>
<tr class="memdesc:a2b996c7f57f00197b2a21ec4e00265d0"><td class="mdescLeft">&#160;</td><td class="mdescRight">IO 置高(须保证对应 IO 为 GPIO 输出状态, 否则操作无效)  <a href="dev__io_8h.html#a2b996c7f57f00197b2a21ec4e00265d0">更多...</a><br /></td></tr>
<tr class="separator:a2b996c7f57f00197b2a21ec4e00265d0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock"><p >IO 模拟外设功能底层操作宏, 用于对接[外设驱动层], [用户层]应使用[驱动层]的接口, 不宜直接使用本模块 </p>
<p >/ </p><dl class="section since"><dt>自从</dt><dd>Change Logs: Date Author Notes 2022-12-08 lzh the first version </dd></dl>
<dl class="section remark"><dt>备注</dt><dd>以下操作宏均须在被调用前保证对应 IO 已被初始化为 GPIO 功能, 此项由[驱动层]负责保证 即 &lt; GPIO_Init(port, pin, dir, 1, 0, 0) &gt;</dd></dl>
<dl class="section attention"><dt>注意</dt><dd></dd></dl>
<p>THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE TIME. AS A RESULT, SYNWIT SHALL NOT BE HELD LIABLE FOR ANY DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE CODING INFORMATION CONTAINED HEREIN IN CONN- -ECTION WITH THEIR PRODUCTS.</p>
<dl class="section copyright"><dt>版权所有</dt><dd>2012 Synwit Technology </dd></dl>

<p class="definition">在文件 <a class="el" href="dev__io_8h_source.html">dev_io.h</a> 中定义.</p>
</div><h2 class="groupheader">宏定义说明</h2>
<a id="a171b4c64b86b9c81fdab4fb5c91abda3" name="a171b4c64b86b9c81fdab4fb5c91abda3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a171b4c64b86b9c81fdab4fb5c91abda3">&#9670;&#160;</a></span>IO_DIR_I</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_DIR_I</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">GPIOx, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">PINx&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;( ( (GPIOx)-&gt;DIR ) &amp;= ~( 0x01 &lt;&lt; (PINx) ) )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置 IO 口方向 - 输入 </p>

<p class="definition">在文件 <a class="el" href="dev__io_8h_source.html">dev_io.h</a> 第 <a class="el" href="dev__io_8h_source.html#l00029">29</a> 行定义.</p>

</div>
</div>
<a id="a0035ca7a6992ee60ccd0bab873012994" name="a0035ca7a6992ee60ccd0bab873012994"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0035ca7a6992ee60ccd0bab873012994">&#9670;&#160;</a></span>IO_DIR_O</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_DIR_O</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">GPIOx, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">PINx&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;( ( (GPIOx)-&gt;DIR ) |= ( 0x01 &lt;&lt; (PINx) ) )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>设置 IO 口方向 - 输出 </p>

<p class="definition">在文件 <a class="el" href="dev__io_8h_source.html">dev_io.h</a> 第 <a class="el" href="dev__io_8h_source.html#l00031">31</a> 行定义.</p>

</div>
</div>
<a id="ab0ead146e3adc7e8710afee28f736c95" name="ab0ead146e3adc7e8710afee28f736c95"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab0ead146e3adc7e8710afee28f736c95">&#9670;&#160;</a></span>IO_GET</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_GET</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">GPIOx, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">PINx&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;( ( ( (GPIOx)-&gt;IDR ) &gt;&gt; (PINx) ) &amp; 0x01 )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取 IO 输入(须保证对应 IO 为 GPIO 输入状态, 否则操作无效) </p>

<p class="definition">在文件 <a class="el" href="dev__io_8h_source.html">dev_io.h</a> 第 <a class="el" href="dev__io_8h_source.html#l00034">34</a> 行定义.</p>

</div>
</div>
<a id="a96b4afe19e3f086e8b63be4f58797a71" name="a96b4afe19e3f086e8b63be4f58797a71"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a96b4afe19e3f086e8b63be4f58797a71">&#9670;&#160;</a></span>IO_SET_L</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_SET_L</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">GPIOx, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">PINx&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;( *( ( &amp;( (GPIOx)-&gt;DATAPIN0 ) ) + (PINx) ) = 0 )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 置低(须保证对应 IO 为 GPIO 输出状态, 否则操作无效) </p>

<p class="definition">在文件 <a class="el" href="dev__io_8h_source.html">dev_io.h</a> 第 <a class="el" href="dev__io_8h_source.html#l00037">37</a> 行定义.</p>

</div>
</div>
<a id="a2b996c7f57f00197b2a21ec4e00265d0" name="a2b996c7f57f00197b2a21ec4e00265d0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a2b996c7f57f00197b2a21ec4e00265d0">&#9670;&#160;</a></span>IO_SET_H</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define IO_SET_H</td>
          <td>(</td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">GPIOx, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname">PINx&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td>&#160;&#160;&#160;( *( ( &amp;( (GPIOx)-&gt;DATAPIN0 ) ) + (PINx) ) = 1 )</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>IO 置高(须保证对应 IO 为 GPIO 输出状态, 否则操作无效) </p>

<p class="definition">在文件 <a class="el" href="dev__io_8h_source.html">dev_io.h</a> 第 <a class="el" href="dev__io_8h_source.html#l00039">39</a> 行定义.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.5
</small></address>
</body>
</html>
